package com.ajk.server.config.remote;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;

import com.ajk.server.service.HospitalDictService;
import com.ajk.server.service.StartUpCheckService;

@Configuration
public class HttpInvokerServerConfig extends BaseRemoteConfig{
	//以下通过httpInvoker发布接口

    @Bean(name = "/startUpCheckService")
    public HttpInvokerServiceExporter startUpCheckService() {
        HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
        exporter.setService(startUpCheckService);
        exporter.setServiceInterface(StartUpCheckService.class);
        return exporter;
    }

    @Bean(name = "/hospitalDictService")
    public HttpInvokerServiceExporter hospitalDictService() {
        HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
        exporter.setService(hospitalDictService);
        exporter.setServiceInterface(HospitalDictService.class);
        return exporter;
    }
}